From 5658c03dc7dce93d6bb78d44e88a22c0e374fb30 Mon Sep 17 00:00:00 2001 From: tsteven4 Date: Sun, 5 Jan 2014 18:11:02 +0000 Subject: [PATCH] an1 leak fixes. --- gpsbabel/an1.cc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/gpsbabel/an1.cc b/gpsbabel/an1.cc index 9b1ab678b..d8d5cd136 100644 --- a/gpsbabel/an1.cc +++ b/gpsbabel/an1.cc @@ -872,7 +872,7 @@ static void Read_AN1_Lines(gbfile* f) if (rec->lineweight) { rte_head->line_width = rec->lineweight; } - rte_head->rte_name = xstrdup(rec->name); + rte_head->rte_name = rec->name; fs_chain_add(&rte_head->fs, (format_specific_data*)rec); route_add_head(rte_head); for (j = 0; j < (unsigned) rec->pointcount; j++) { @@ -883,14 +883,14 @@ static void Read_AN1_Lines(gbfile* f) wpt_tmp = waypt_new(); wpt_tmp->latitude = DecodeOrd(vert->lat); wpt_tmp->longitude = -DecodeOrd(vert->lon); - wpt_tmp->shortname = (char*) xmalloc(7); #if NEW_STRINGS wpt_tmp->shortname = QString().sprintf("\\%5.5lx", rtserial++); #else + wpt_tmp->shortname = (char*) xmalloc(7); sprintf(wpt_tmp->shortname, "\\%5.5lx", rtserial++); +#endif fs_chain_add(&wpt_tmp->fs, (format_specific_data*)vert); -#endif route_add_wpt(rte_head, wpt_tmp); } } -- 2.30.2